<template>
	<component
		:is="pieChart"
		:chartData="chartOptions"
		position="inner"
		unit="%"
	/>
</template>

<script setup>
import { computed, defineEmits, onMounted, reactive, ref, defineProps, watch } from 'vue'
import pieChart from './pieChart'

const props = defineProps({
	list: {
		type: Array,
		default: () => {}
	}
})

const chartOptions = computed(() => {
	return props.list || [
		{ name: '已达标', value: 0 },
		{ name: '未达标', value: 0 },
	]
})
</script>

<style scoped lang="less">
:deep(.pie-chart) {
	height: 320px;
}
</style>
